/*
   @Copyright:LeetCode
   @Author:   tjyemail
   @Problem:  http://leetcode.com/problems/excel-sheet-column-number
   @Language: C++
   @Datetime: 19-11-27 16:25
   */

class Solution {
public:
	int titleToNumber(string s) {
		int num=0;
		for(const char &c:s)
			num=num*26+(c-'A'+1);
		return num;
	}
};
